The BareTrace
class lets you create a trace class that has been parsed outside of trappy. This lets you leverage trappy's and bart's facilities with any type of trace.
Let's assume that we have events available in a csv file. We can import them into a trace object by creating a BareTrace
object and adding them using add_parsed_event
.
In [1]:
import pandas as pd
import trappy
First we import the parsed events into a pandas DataFrame
In [2]:
event = pd.DataFrame.from_csv("sample_trace.csv")
Now we create an trappy trace object and add our event to it.
In [3]:
trace = trappy.BareTrace()
trace.add_parsed_event("http_access", event)
We can add more events if we had collected them from different sources. Just call .add_parsed_event()
for each of them
In [ ]:
trappy.ILinePlot(trace, trace.http_access, column=["response_time"]).view()